package com.push_label.server;

import com.push_label.bean.order.OrderStatusInfo;
import com.push_label.mapper.OrderMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

@Service
@Slf4j
public class OrderServiceImpl implements OrderService {

    @Resource
    public OrderMapper orderMapper;

    @Override
    @Cacheable(cacheNames = "basic_orderstatus",key = "'all'" ,unless = "#result == null")
    public List<OrderStatusInfo> selectAllOrderStatusInfo() {
        return orderMapper.selectAllOrderStatusInfo();
    }
}
